package io.renren.modules.alarm.controller;

import io.renren.common.utils.R;
import io.renren.modules.alarm.service.AlarmListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 报警管理/综合看板
 */
@RequestMapping("alarmList")
@RestController
public class AlarmListController {

    @Autowired
    private AlarmListService alarmListService;

    //报警管理-报警列表
    @RequestMapping("getList")
    public R getList(@RequestParam Map<String, Object> params) {
        return R.ok(alarmListService.getList(params));
    }

    //获取报警数据详情
    @RequestMapping("get")
    public R get(Integer id) {
        return alarmListService.get(id);
    }

    //综合看板
    @RequestMapping("integratedSignage")
    public R integratedSignage(String spaceName) {
        return alarmListService.integratedSignage(spaceName);
    }

    //综合看板
    @RequestMapping("getHealthOrComfort")
    public R getHealthOrComfort(String spaceName) {
        return alarmListService.getHealthOrComfort(spaceName);
    }

    //获取报警数据集合
    @RequestMapping("getAlarmValueList")
    public R getAlarmValueList(String id) {
        return alarmListService.getAlarmValueList(id);
    }

}
